﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;

namespace Controls
{
    public class PsPopWin : TextBoxX
    {
        private string _popKey;

        public string PopKey
        {
            get { return _popKey; }
            set { _popKey = value; }
        }

        private bool _isUserModify = false;

        public bool IsUserModify
        {
            get { return _isUserModify; }
            set { _isUserModify = value; }
        }

        private bool _isValueChange = false;

        public bool IsValueChange
        {
            get { return _isValueChange; }
            set { _isValueChange = value; }
        }

        private string _value;

        [BrowsableAttribute(false)]
        public string Value
        {
            get { return _value; }
            set { _value = value; }
        }

        private string _pressWord;

        public string PressWord
        {
            get { return _pressWord; }
            set { _pressWord = value; }
        }

        public string DefaultText = "";

        protected override bool RanderOther(Graphics g, Pen pen)
        {
            // g.DrawRectangle(pen, this.Width - 10, 7, 8, 5);
            if (this.IsRequie && !this.SysReadOnly)
            {
                g.DrawImage(Resource1.nhpopup, this.Width - 15, 1);
            }
            else if (!this.SysReadOnly)
            {
                g.DrawImage(Resource1.hpopup, this.Width - 15, 1);
            }

            return false;
        }
    }
}
